
package tx.bj12320.model.enums;

import java.util.LinkedHashMap;

import cn.org.rapid_framework.lang.enums.EnumBase;
import cn.org.rapid_framework.lang.enums.EnumBaseUtils;

public enum SysUserTypeEnum implements EnumBase<String>{
	BJ12320(new String("BJ12320"),"北京12320"),
	HOSPITAL(new String("HOSPITAL"),"医院"),
	SECTION_BOARD_OF_HEALTH(new String("SECTION_BOARD_OF_HEALTH"),"区县卫生局")
	;

	private final String code;
	private final String desc;
	SysUserTypeEnum(String code,String desc) {
		this.code = code;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public static SysUserTypeEnum getByCode(String code) {
		return EnumBaseUtils.getByCode(code, values());
	}

	public static SysUserTypeEnum getRequiredByCode(String code) throws IllegalArgumentException {
		return EnumBaseUtils.getRequiredByCode(code, values());
	}

	@SuppressWarnings("unchecked")
	public static LinkedHashMap<String, String> toMap() {
	    return EnumBaseUtils.toMap(values());
	}
}
